<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>提现统计</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
		<link rel="stylesheet" href="../../../css/common.css" media="all">
		<style>
			.list-tb-div td .tDiv {
				padding: 0px;
				text-align: center;
				word-break: break-all;
			}

			.importane {
				font-size: 15px;
				color: #F00;
				font-weight: 600;
			}

			.tpinfo {
				min-height: 100px;
				border-bottom: 1px solid #ececec;
			}

			.td-product img {
				border: 1px solid #efefef;
				padding: 1px;
			}

			.list-tb-div td .tDiv {
				padding: 10px;
				text-align: center;
				word-break: break-all;
			}

			.list-tb-div td .tDiv.left {
				padding: 10px;
				text-align: left;
				word-break: break-all;
			}

			.list-tb-div .td-product .product-info {
				padding-left: 90px;
				text-align: left;
				margin-top: 20px;
			}

			blockquote,
			body,
			button,
			dd,
			div,
			dl,
			dt,
			form,
			h1,
			h2,
			h3,
			h4,
			h5,
			h6,
			input,
			li,
			ol,
			p,
			pre,
			td,
			textarea,
			th,
			ul {
				margin: 0;
				padding: 0;
				-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
			}

			.list-tb-div table {
				margin-bottom: 5px;
				font-size: 12.5px;
			}

			.list-div table {
				width: 120%;
			}

			table {
				border-collapse: collapse;
				border-spacing: 0;
			}

			.list-tb-div .td-product .img {
				width: 80px;
				height: 80px;
			}

			.list-tb-div .tr-order-sn .tDiv {
				text-align: left;
				padding: 0;
			}

			.list-tb-div td .tDiv {
				padding: 10px;
				text-align: center;
				word-break: break-all;
			}

			.list-tb-div td .ml10 {
				padding-left: 5px;
			}

			.list-tb-div td .ml10 .words {
				margin-left: 10px;
				margin-right: 10px;
				line-height: 28px;
			}

			.list-tb-div .tr-order-sn .tDiv.center {
				text-align: center;
				padding: 0;
			}

			.layui-table td,
			.layui-table th {
				position: relative;
				padding: 9px 15px;
				min-height: 20px;
				line-height: 20px;
				font-size: 14px;
			}

			td .layui-table-cell {
				text-align: center;
				height: 100px;
				white-space: normal;
			}

			.layui-table img,
			.layui-table video {
				width: 50px;
				max-width: 60px;
			}

			td .layui-table-cell {
				text-align: center;
				height: auto;
				white-space: normal;
			}

			.tDiv {
				font-size: 10px;
				line-height: 15px;
			}

			.tDiv-price {
				font-size: 15px;
				line-height: 18px;
			}
		</style>
	</head>

	<body>
		<div class="layui-fluid">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-md12">
					<div class="layui-card">
						<div class="layui-card-header table-operate-btn">
							<button class="layui-btn layui-btn-normal layui-btn-sm" data-type="exportCustomerData">查询</button>
							<button id="importbill" class="layui-btn layui-btn-normal layui-btn-sm" data-type='importdata' name="">导入</button>				
						</div>
						<div class="layui-tab layui-tab-brief" lay-filter="changetab">
							<div class="layui-card-body">
								<!-- 搜索 -->
								<form class="layui-form search" id="form" onsubmit="return false" action="##">
									<div class="layui-inline search_inline">
										<label class="layui-form-label">团队名称：</label>
										<div class="layui-input-inline">
											<input class="layui-input" lay-verify="" placeholder="团队名称" name="team_id" autocomplete="off">
										</div>							
									</div>
									<!-- <div class="layui-inline search_inline">
										<label class="layui-form-label">省市县：</label>
										<div class="layui-input-inline">
											<input class="layui-input" lay-verify="" placeholder="团队名称" name="province" autocomplete="off">
										</div>							
									</div> -->
									<div class="layui-inline search_inline">
										<label class="layui-form-label">状态：</label>
										<div class="layui-input-inline">
											<select name="status" lay-verify="status">									
												<option value="0">申请中</option>
												<option value="1">已处理</option>
											</select>
										</div>
									</div>		
									<div class="layui-inline search_inline">
										<label class="layui-form-label">类型：</label>
										<div class="layui-input-inline">
											<select name="money_type" lay-verify="status">									
												<option value="0">挂售</option>
												<option value="1">乐购</option>
											</select>
										</div>
									</div>
									<div class="layui-inline search_inline">
										<label class="layui-form-label">开始时间：</label>
										<div class="layui-input-inline">
											<input type="starttime" class="layui-input" id="ID-laydate-type-datetime-1" placeholder="yyyy-MM-dd HH:mm:ss">								
										</div>
									</div>
									<div class="layui-inline search_inline">
										<label class="layui-form-label">结束时间：</label>
										<div class="layui-input-inline">
											<input type="endtime" class="layui-input" id="ID-laydate-type-datetime-2" placeholder="yyyy-MM-dd HH:mm:ss">								
										</div>
									</div>
									<button class="layui-btn search_inline" lay-submit="" lay-filter="search"
										data-type="reload">查询</button>
									<button class="layui-btn layui-btn-primary search_inline" type="reset">重置</button>
								</form>
								<!-- 搜索 -->
								<table class="layui-hide" id="test-table-operate" lay-filter="test-table-operate">
								</table>
								<script type="text/html" id="test-table-operate-barDemo">
									<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="detail">明细</a>
									<a class="layui-btn layui-btn-xs" lay-event="orderdetail">订单详情</a>							
									{{# if(d.status == 30 ){ }}
										<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="edit">配送</a>
										{{# } }}

											{{# if(d.status == 30&&d.shop_station){ }}
												<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="station_delivery">自提发货</a>
												{{# } }}

													<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="edit_orders_sub">修改</a>
													<!--<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="wait_confirm">确认订单</a>-->
								</script>
								<script type="text/html" id="test-table-operate-cancel">
								{{# if(d.status >= 20 && d.status < 50 ){ }}
									<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="ordercancel">取消订单</a>
								{{# } }}

								{{# if(d.status >= 50 && d.status_goods_return != 2 ){ }}
									<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="ordergoodsreturn">退货</a>
								{{# } }}
								</script>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- 商品详情 -->
		<script type="text/html" id="test-table-operate-goods">
			<font style="color: #000;">订单编号：{{d.orderid?d.orderid:''}}</font><br>

			{{# if(d.seckill_no ){ }}
				<font style="color: red;">拼团期号：{{d.seckill_no?d.seckill_no:''}}</font><br>
				{{# } }}

					{{# layui.each(d.orders_sub_list,function(index,o){ }}
						{{# if(o.goods_image_url){ }}
							<div class="tDiv relative     " style="text-align: left;">
								<div class="img" style="display: inline-block;vertical-align: top;">
									<img width="70" src={{o.goods_image_url}} alt="">
								</div>
								<div class="tDiv" style="display: inline-block;vertical-align: top;">
									X {{o.quantity}}
								</div>

								<div class="name mb5" style="display: inline-block;vertical-align: top;width: 330px;">
									商品编号:<span id="" class="importane"> {{o.skuid}} </span>
									<br />
									商品名称:{{o.skuname?o.skuname:''}}
									<br /> 规格参数:{{o.specparam?o.specparam:''}}
									<br /> 店铺:{{ o.support?o.support:'' }},
								</div>
							</div>
							{{# }}}
								{{# })}}
		</script>
		<!--返佣详情-->
		<script type="text/html" id="test-table-operate-orders_fee">

		{{# if(d.orders_fee){ }}
			<font style="color: #000;">订单编号：{{d.orderid?d.orderid:''}}</font><br>
			{{# }}}
				{{# layui.each(d.orders_fee,function(index,o){ }}
					<div class="tDiv left" style="text-align: left;">
						<font style="color: #000;">推荐人编号：{{o.recommend?o.recommend:''}}</font><br>
						<font style="color: #000;">佣金：{{o.recommend_fee?o.recommend_fee:''}}</font><br>
					</div>
					{{# })}}
		</script>
		<div id="customerExportDialog" style="display: none;height: 400px;padding:10px;">
			<form class="layui-form search" id="form" onsubmit="return false" action="##">
				<div class="layui-inline search_inline" style="display: flex;">
					<label class="layui-form-label" style="width: 150px;" name="province">省、直辖市、自治区：</label><br/>
					<div class="layui-input-inline">
						<input class="layui-input" lay-verify="" placeholder="省、直辖市、自治区" name="team_id" autocomplete="off">
					</div>							
				</div>
				<div class="layui-inline search_inline" style="display: flex;">
					<label class="layui-form-label" style="width: 150px;" name="city">开户地区-市:</label><br/>
					<div class="layui-input-inline">
						<input class="layui-input" lay-verify="" placeholder="开户地区-市" name="team_id" autocomplete="off">
					</div>							
				</div>
				<div class="demo-login-container">
					<button class="layui-btn layui-btn-fluid" lay-submit lay-filter="confirmExport">查找</button>
				</div>
			</form>
		</div>


		<script src="../../../layuiadmin/layui/layui.js"></script>
		<script src="../../../js/jquery.min.js"></script>
		<script src="../../../js/common.js"></script>
		<script src="../../../js/dayjs.min.js"></script>
		<script>
			layui.config({
				base: '../../../layuiadmin/' //静态资源所在路径
			}).extend({
				index: 'lib/index' //主入口模块
			}).use(['index', 'table', 'form', 'laydate', 'element', 'laytpl'], function() {
				var table = layui.table,
					laydate = layui.laydate,
					$ = layui.$,
					form = layui.form,
					laytpl = layui.laytpl,
					element = layui.element,
					admin = layui.admin;
					var _data = {}
				order_status_show('option')
				payment_show('option');
				initdata();
				initstatusdata();
				//&cid=1&status=1&money_type=1&starttime=2023-09-19+00%3A00%3A00&endtime=2023-09-19+23%3A59%3A59
				function initdata() {
					table.render({
						elem: '#test-table-operate',
						url: 'https://api.aideapi.com/api/router/le.withdrawals.query?app_id=LeTao&secret_id=shopweixinWSPobnqU4iCzO4IPyRhBKOODjiHDcLe&secret_key=3f4511c9ff9c4c04b03781e3df19c82le&cid=1&status=1&money_type=1&starttime=2023-09-19+00%3A00%3A00&endtime=2023-09-19+23%3A59%3A59',
						totalRow: true,
						toolbar: true,
						height: 'full-165',
						cols: [
							[{
									width: 60,
									field: 'id',
									title: '编号',

								}, {
									field: 'account_bank',
									title: '收款账户',
								}, {
								
									field: 'account_name',
									title: '收款人名称',
								}, {
									field: 'idcard',
									title: '收款人身份证号',
								},{
									field: 'realphone',
									title: '收款人手机号',
								},{
									field: 'branchname',
									title: '开户行支行名称',
								},{
									field: 'province',
									title: '收款人所在省',
								},{
									field: 'city',
									title: '收款人所在市',
								},{
									field: 'money',
									title: '金额',
								},{
									field: 'user_type',
									title: '用途（附言）',
								},{
									field: 'user_id',
									title: '用户ID',
								},{
									field: 'create_time',
									title: '申请时间',
								},{
									field: 'money_type',
									title: '打款类型'
								}
							]
						],
						page: true,
						where: _data,
						limit: limit,
						limits: limits,
						request: {
							pageName: 'page',
							limitName: 'size' //每页数据量的参数名，默认：limit
						},
						//返回的数据处理
						parseData: function(res) { //将原始数据解析成 table 组件所规定的数据
							return {
								"code": res.code, //解析接口状态
								"msg": res.msg, //解析提示文本
								"count": res.withdrawals.pager.total, //解析数据长度
								"data": res.withdrawals.data //解析数据列表
							};
						}
					});
				}
				laydate.render({
					elem: '#choosetime',
					type: 'datetime',
					range: true,
					done: function(value, date) {
						$('input[name=s_dates]').val(value.split(' - ')[0]);
						$('input[name=e_dates]').val(value.split(' - ')[1]);
					}
				});

				//开始日期时间选择器
				laydate.render({ 
					elem: '#ID-laydate-type-datetime-1'
					,type: 'datetime'
				});

				//结束日期时间选择器
				laydate.render({ 
					elem: '#ID-laydate-type-datetime-2'
					,type: 'datetime'
				});


				laydate.render({
					elem: '#exportOrderDate',
					type: 'date'
				});
				//监听搜索
				form.verify({
					memberid: function(value, item) { //value：表单的值、item：表单的DOM对象
						if (!value) {
							return '姓名不能为空';
						}
					}
				});
				//监听搜索
				form.on('submit(search)', function(data) {
					console.log(data)
					_data = Object.assign(_data, data.field);
					initdata();

					return false;
				});

				$("button[type=reset]").on("click", function() {
					_data = {}
					$('input[name=s_dates]').val('')
					$('input[name=e_dates]').val('')
					initdata();
					document.getElementById("form").reset();
				});


				//监听表格复选框选择
				table.on('checkbox(test-table-operate)', function(obj) {
					console.log(obj)
				});
				//监听TAB
				element.on('tab(changetab)', function(elem) {
					status = this.getAttribute('lay-id');
                    if (status === 'status_goods_return') {
                        _data.status = ''
                        _data['status_goods_return'] = 'status_goods_return'
                    } else {
                        _data['status_goods_return'] = ''
                        _data.status = status;
                    }
					initdata();
				});

				function initstatusdata() {
					$.ajax({
						type: "get",
						url: server.querymap,
						async: false,
						success: function(res) {
							if (res.code == 0) {
								map = res.dict_libraries_list.data;
								var data = map.order_status
								data.push({
                                    value: 'status_goods_return',
                                    name: '已退货'
                                })
								
								$.each(data, function(index, item) {
									$('#exportOrderStatus').append('<option value="' + item.value + '">' + item.name + '</option>')
								})
								form.render('select')
								element.init();
							} else {
								layer.msg(res.msg);
							}
						}
					});
				}
				//监听导入
				$('#importbill').on('click', function () {
					var htmlContent = '<div style="width:100%;height:100%;text-align: center;">'
					htmlContent += '<div class="layui-upload-drag" id="importData" >';
					htmlContent += '<input multiple="multiple" type="file" style="cursor:pointer;opacity: 0.0; position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height:100%;">';
					htmlContent += '<i class="layui-icon"></i>';
					htmlContent += '<p id="filename">点击选择文件，或将文件拖拽到此处，支持多文件导入</p>';
					htmlContent += '</div>';
					htmlContent += '<div ">';
					//htmlContent += '<button id="downloadFiles" class="layui-btn" style="margin-top:10px;margin-bottom:10px;">下载模板</button>';
					htmlContent += '</div>';
					htmlContent += '</div>';
					layer.open({
						type: 1
						, offset: "auto"
						, id: 'layer_importData'
						, title: '导入'
						, area: '400px'
						, content: htmlContent    //需要打开的模板
						, btnAlign: 'c' //按钮居中
						, shade: 0 //不显示遮罩
						, success: function (layero, index) {
							// 监听上传文件的事件
							$('#importData').change(function (e) {
								var files = e.target.files;
								uploadExcel(files);
							});
							//下载模板
						}
	
					});
				});
				//监听工具条
				table.on('tool(test-table-operate)', function(obj) {
					
					var data = obj.data;
					if (obj.event === 'detail') {
						layer.open({
							type: 2,
							title: '明细',
							shadeClose: false,
							shade: 0.5,
							maxmin: true, //开启最大化最小化按钮
							area: ['80%', '70%'],
							content: 'sub_order.html?orderid=' + data.orderid,
							end: function() {}
						});
					} else if (obj.event === 'orderdetail') {
						layer.open({
							type: 2,
							title: '订单详情',
							shadeClose: false,
							shade: 0.5,
							area: ['90%', '90%'],
							content: '../model/order_details.html?id=' + data.id + '&orderid=' + data
								.orderid,
							end: function() {}
						});

						//location.href = '../model/order_details.html?id=' + data.id

						//location ='../model/order_details.html?id=' + data.id
					} else if (obj.event === 'edit') {
						console.log(data, 'data------')
						layer.open({
							type: 2,
							title: '配送',
							shadeClose: false,
							shade: 0.5,
							maxmin: true, //开启最大化最小化按钮
							area: ['85%', '80%'],
							content: '../model/order_delivery.html?id=' + data.id + '&orderid=' + data
								.orderid + '&quantity=' + data.quantity + '&memberid=' + data.memberid +
								'&specname=' + data.orders_sub_list[0].specname + '&type=' + data.type + '&mobile=' + data.mobile,
							end: function() {}
						});
					} else if (obj.event === 'wait_confirm') {
						

					} else if (obj.event === 'seeimg') {
						var img_data = {
							"data": [{
								"src": data.delivery_url
							}]
						}
						layer.photos({
							photos: img_data,
							anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机
						});
					} else if (obj.event === 'edit_deliver') {
						layer.open({
							type: 2,
							title: '配送',
							shadeClose: false,
							shade: 0.5,
							area: ['85%', '70%'],
							content: '../model/order_delivery.html?id=' + data.id + '&orderid=' + data
								.orderid + '&quantity=' + data.quantity + '&memberid=' + data.memberid +
								'&specname=' + data.specname,
							end: function() {}
						});
					} else if (obj.event === 'ordercancel') {
						var lock = false
						layer.confirm('确定要取消订单？', function() {
							if (!lock) {
								lock = true
								$.ajax({
									url: server.sys_order_cancel,
									type: 'post',
									dataType: 'json',
									data: "orderid=" + data.orderid,
									success: function(data) {
										if (data.code == '0') {
											layer.msg("取消成功")
											initdata();
										} else {
											layer.msg(data.msg)
										}
									},
									'error': function() {
										layer.msg('系统错误');
									}
								})
							}
						});
					} else if (obj.event === 'station_delivery') {
						console.log(data, 'data------')
						var lock = false
						layer.confirm('确定要自提发货？', function() {
							if (!lock) {
								lock = true
								$.ajax({
									url: server.shop_station_orders_delivery,
									type: 'post',
									dataType: 'json',
									data: "orderid=" + data.orderid + "&mobile=" + data.mobile + "&shopname=" + localStorage.getItem('pxy_parent_shopname') + '&delivery_name=' + data.shop_station[0].community_name,
									success: function(data) {
										if (data.code == '0') {
											layer.msg("自提发货成功")
											initdata();
										} else {
											layer.msg(data.msg)
										}
									},
									'error': function() {
										layer.msg('系统错误');
									}
								})
							}
						});
					} else if (obj.event === 'edit_orders_sub') {

						var url = 'views/shop_manage/model/orders_sub_edit.html?id=' + data.id + '&orderid=' +
							data.orderid
						if (top.layui.index) {
							top.layui.index.openTabsPage(url, '修改订单信息')
						} else {
							window.open(url)
						}
					} else if (obj.event === 'ordergoodsreturn') {
						layer.open({
							type: 2,
							title: '订单退货',
							shadeClose: false,
							shade: 0.5,
							area: ['90%', '90%'],
							content: '../model/order_goods_return.html?id=' + data.id + '&orderid=' + data
								.orderid,
							end: function() {}
						});
						
					}

				});

				var $ = layui.$,
					active = {
						del: function() { //获取选中数据
							var checkStatus = table.checkStatus('test-table-operate'),
								data = JSON.stringify(checkStatus.data);
							var orderid = "";
							for (var i = 0; i < checkStatus.data.length; i++) {
								orderid += checkStatus.data[i].orderid;
								if (i != checkStatus.data.length - 1) {
									orderid += ",";
								}
							}
							if (checkStatus.data.length == 0) {
								layer.msg('至少选择一条')
							} else {
								var lock = false
								layer.confirm('确定要删除所选的' + checkStatus.data.length + '条数据？', function() {
									if (!lock) {
										lock = true
										$.ajax({
											url: server.orders_delete,
											type: 'post',
											dataType: 'json',
											data: "orderid=" + orderid,
											success: function(data) {
												if (data.code == '0') {
													layer.msg('删除成功');
													initdata();
												} else {
													layer.msg('删除失败');
													initdata();
												}
											},
											'error': function() {
												layer.msg('系统错误');
												initdata();
											}
										})
									}
								});
							}
						},
						zitis: function() { //获取选中数据
							var checkStatus = table.checkStatus('test-table-operate'),
								data = JSON.stringify(checkStatus.data);
							var orderid = "";
							for (var i = 0; i < checkStatus.data.length; i++) {
								if (checkStatus.data[i].station_id) {
									orderid += checkStatus.data[i].orderid;
									if (i != checkStatus.data.length - 1) {
										orderid += ",";
									}
								}
							}
							if (checkStatus.data.length == 0) {
								layer.msg('至少选择一条')
							} else {
								var lock = false
								layer.confirm('确定要批量自提发货所选的' + checkStatus.data.length + '条数据？', function() {
									if (!lock) {
										lock = true
										$.ajax({
											url: server.shop_station_orders_delivery,
											type: 'post',
											dataType: 'json',
											data: "orderid=" + orderid,
											success: function(data) {
												if (data.code == '0') {
													layer.msg('批量自提发货成功');
													initdata();
												} else {
													layer.msg('批量自提发货失败');
													initdata();
												}
											},
											'error': function() {
												layer.msg('系统错误');
												initdata();
											}
										})
									}
								});
							}
						},
						getCheckData: function() { //获取选中数据
							var checkStatus = table.checkStatus('test-table-operate'),
								data = checkStatus.data;
							layer.alert(JSON.stringify(data));
						},
						getCheckLength: function() { //获取选中数目
							var checkStatus = table.checkStatus('test-table-operate'),
								data = checkStatus.data;
							layer.msg('选中了：' + data.length + ' 个');
						},
						isAll: function() { //验证是否全选
							var checkStatus = table.checkStatus('test-table-operate');
							layer.msg(checkStatus.isAll ? '全选' : '未全选')
						},
						exportCustomerData: function() { // 导出自定义数据
							layer.open({
								type: 1,
								area: ['380px', '400px'],
								shade: false, // 不显示遮罩
								content: $('#customerExportDialog'), // 捕获的元素
								end: function(){
									console.log()
								}
							});
						}
					};

				form.on('submit(confirmExport)', function(data) {
					console.log(data)
					var postData = data.field
				
					if (postData.exportOrderStatus) {
						if (postData.exportOrderStatus === 'status_goods_return') {
							postData['status'] = ''
							postData['status_goods_return'] = 'status_goods_return'
						} else {
							postData['status_goods_return'] = ''
							postData['status'] = status;
						}
					}
					if (postData.exportOrderDate) {
						postData['s_dates'] = postData.exportOrderDate + " 00:00:00"
						postData['e_dates'] = postData.exportOrderDate + " 23:59:59"
					}
					postData['address'] = postData.exportOrderAddress || ''
					postData['size'] = 10000
			
					loading()
					$.ajax({
						type: "get",
						url: server.queryorders_goods,
						data: postData,
						success: function(res) {
							layer.closeAll()
							if (res.code == 0) {
								confirmExport(res.orders.data, postData.exportOrderDate, $("#exportOrderStatus").find("option:selected").text())
							} else {
								layer.msg(res.msg);
							}
						}
					});
				});

				function confirmExport(resData, exportDate, statusTxt) {
					if (resData.length <= 0) {
						layer.msg('该日期无导出数据');
						return
					}
					var exportData = []
					$.each(resData, function(index, item) {
						var shopName = [], shopSpecs = []
						$.each(item.orders_sub_list, function(subIndex, subItem) {
							shopName.push(subItem.skuname)
							shopSpecs.push(subItem.specparam)
						})
						exportData.push([
							item.orderid + '\t',
							item.consignee,
							item.mobile + '\t',
							(item.areaname || '') + (item.address || ''),
							shopName.join(','),
							shopSpecs.join(',') || '',
							item.quantity,
							item.amount,
							item.fee_score || '',
							item.pay_price || '',
							item.addtime,
							item.pay_time || '',
							item.notes || '',
							item.delivery_name || '',
							(item.delivery_waybill || '') + '\t'
						])
					})
					console.log(exportData)
					var pxy_shopname = localStorage.getItem('pxy_shopname')
					var customTitle = ['订单号', '收货人', '收货人手机号', '收货人地址', '商品名称', '规格', '数量', '订单金额', '使用积分', '支付金额', '下单时间', '付款时间', '备注', '快递公司', '快递号']
					table.exportFile(customTitle, exportData, 'xls', pxy_shopname + '_' + exportDate + '_' + statusTxt + '订单');
				}

				$('.table-operate-btn .layui-btn').on('click', function() {
					var type = $(this).data('type');
					active[type] ? active[type].call(this) : '';
				});
			});
		</script>
	</body>
</html>
